package com.hsh.erp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hsh.erp.domain.common.Result;
import com.hsh.erp.domain.dto.OutboundDTO;
import com.hsh.erp.domain.entity.Order;
import com.hsh.erp.domain.entity.Outbound;
import com.hsh.erp.domain.vo.OutboundVO;

import java.util.List;

/**
 * @author USER
 * @description 针对表【outbound】的数据库操作Service
 * @createDate 2024-05-30 16:21:43
 */
public interface OutboundService extends IService<Outbound> {

    /**
     * 列表查询
     *
     * @param
     * @return
     */
    Result<List<OutboundDTO>> getList(OutboundVO outboundVO);

    /**
     * 修改一条记录
     *
     * @param
     * @return
     */
    Result updateOne(OutboundVO outboundVO);

    /**
     * 删除一条记录
     *
     * @param
     * @return
     */
    Result deleteOne(OutboundVO outboundVO);

    /**
     * 新增一条记录
     *
     * @param
     * @return
     */
    Result addOne(OutboundVO outboundVO);

    /**
     * 批量新增
     *
     * @param
     * @return
     */
    Result addList(List<OutboundVO> outboundVOList);

    /**
     * 指定时间内的出库总数量，并按产品+仓库（可选）分组
     *
     * @param outboundVO
     * @return
     */
    List<OutboundDTO> getOutNumByTime(OutboundVO outboundVO);

    /**
     * 删除一条记录
     *
     * @param order
     * @return
     */
    boolean deleteByOrder(Order order);
}
